<?php
// +----------------------------------------------------------------------
// | sfadmin - Suifeng Administration
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://suifeng.tech All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: suifeng <1787585212@qq.com>
// +----------------------------------------------------------------------

namespace app\cms;

class Module
{
    public function module_info()
    {
        return array(
            'name'          =>  'cms',
            'title'         =>  '内容',
            'icon'          =>  'fa fa-cog',
            'description'   =>  '内容模块',
            'developer'     =>  '随风',
            'website'       =>  'http://suifeng.tech',
            'version'       =>  '0.36',
        );
    }

    public function module_config()
    {
        return array(
            'nav_group_list'=>  'top:顶部导航' . PHP_EOL . 'main:主导航' . PHP_EOL . 'bottom:底部导航' . PHP_EOL . 'wap_bottom:Wap底部导航',
        );
    }

    public function admin_menu($tree)
    {
        $module_menu = $tree->add('cms', array(
            'title'     =>  '内容',
            'icon'      =>  'fa fa-file-text-o',
            'default'   =>  'cms/admin.slider/index',
        ));

        $content_mgr = $module_menu->add('content_mgr', array(
            'title'     =>  '内容管理',
            'icon'      =>  'fa fa-folder-open-o',
        ));

        $content_mgr->add('config', array(
            'title'     =>  '内容设置',
            'icon'      =>  'fa fa-cog',
            'url'       =>  'cms/admin.config/index',
        ));

        $content_mgr->add('article', array(
            'title'     =>  '文章管理',
            'icon'      =>  'fa fa-file-text-o',
            'url'       =>  'cms/admin.article/index',
        ));

        $content_mgr->add('nav', array(
            'title'     =>  '导航管理',
            'icon'      =>  'fa fa-map-signs',
            'url'       =>  'cms/admin.nav/index',
        ));

        $content_mgr->add('slider', array(
            'title'     =>  '幻灯管理',
            'icon'      =>  'fa fa-image',
            'url'       =>  'cms/admin.slider/index',
        ));
    }
}